<?php error_reporting(0) ?>
<input 
    type="hidden" 
    value="<?php echo $item->Id ?>" 
    id="Id" name="Id"
    />

<form id="_form_edit_panel" name="_form_edit_panel" 
      action="" method="POST" onsubmit="return false;"
      target="integration_asynchronous" autocomplete="off">
    <input 
        type="hidden" 
        value="<?php echo $type ?>" 
        id="Type" name="Type"
        />
    <input 
        type="hidden" 
        value="1" 
        id="Menu" name="Menu"
        />
    <div class="widget- row-fluid">
		<div class="well form-horizontal" style="border:none">
			
			
			
			<div class="control-group">
				<label class="control-label"><?php echo $langs['title']?> :</label>
				<div class="controls">
					<input type="text" 
						class="span12 validate[required]"
						data-prompt-position="topLeft:-1,-5"
						id="Title" name="Title" 
						value="<?php echo quotes_to_entities($item->Title) ?>"
						/>
			   </div>
			</div>
			
			<div class="control-group">
				<label class="control-label"><?php echo $langs['thumb']?>  :</label>
				<div class="controls">
					<input type="text" class="uneditable-input span12" 
						id="Thumb" name="Thumb" 
						value="<?php echo quotes_to_entities($item->Thumb) ?>"
						/>
                    <i class="icon-eye-open field-icon" style="right: auto;left: -12px" 
						title="<img width=40 src='<?php echo quotes_to_entities($item->Thumb) ?>'/>"></i>
					<i class="icon-reorder field-icon" 
						onclick="BrowseServer('#Thumb')"
						title="<?php echo $langs['choosefromserver']?>"></i>
					<ul class="dropdown-menu pull-right" style="right:0;margin-top: 1px;">
			   </div>
			</div>
			
			<div class="control-group">
				<label class="control-label"><?php echo $langs['menuparent']?></label>
				<div class="controls">
					
					<select id="Parent" name="Parent" class=" span12">
						<option value="0">[ <?php echo $langs['menuroot']?> ]</option>
						<?php
						
						foreach ($cates as $c){
							if($c->Id==$item->Id){
								$level=$c->Level;
							}
							if(isset($level) && $c->Level<=$level && $c->Id!=$item->Id){
								unset($level);
							}
							?>
						<option 
							<?php if(isset($level) && $level<$c->Level) echo 'disabled=1' ?>
							<?php if($c->Id==$item->Id) echo 'disabled=1'?>
							<?php if($c->Id==$item->Parent) echo 'selected=1'?>
							value="<?php echo $c->Id?>">
							<?php echo quotes_to_entities($c->Display)?>
							
						</option>
							<?php
						}
						?>
					</select>
						
				</div>
			</div>
			
			<div class="control-group">
				<label class="control-label">DESC  :</label>
				<div class="controls">
					<textarea style="margin-top:1px" rows="5" 
						name="Desc" id="editor_value_0" 
						class="span12 validate[required]" 
						data-prompt-position="topLeft:-1,-5" 
						placeholder="DESC"><?php echo quotes_to_entities($item->Desc) ?></textarea>
			   </div>
			</div>
			
			
			
			
			<div class="control-group">
				<label class="control-label">Link  :</label>
				<div class="controls">
					<input type="text" class="uneditable-input span12" 
						id="Link" name="Link" 
						value="<?php echo quotes_to_entities($item->Link) ?>"
						/>
					<i class="icon-link field-icon" 
						onclick="_LO.onOpenPopup('#Link')"
						title="Link"></i>
			   </div>
			</div>
			
			<div class="control-group">
				<label class="control-label">&nbsp;</label>
				<div class="controls">
					<div class="span6">
						<div><?php echo $langs['position']?></div>
						<input type="number" 
							class="span12"
							id="Position" name="Position" 
							value="<?php echo $item->Position ?>"
							/>
					</div>
					<div class="span6">
						<div><?php echo $langs['status']?></div>
						<select id="Active" name="Active" class=" span12">
							<option value="true" <?php if($item->Active!='false') echo 'selected=1' ?>><?php echo $langs['enable']?></option>
							<option value="false"><?php echo $langs['disable']?></option>
						</select>
						
					</div>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">&nbsp;</label>
				<div class="controls">
					<div>
						<?php if(!empty($item->Insert)) echo "Created  : $item->Insert" ?>
					</div>
					<div>
						<?php if(!empty($item->Update)) echo "Modified : $item->Update" ?>
					</div>
				</div>
			</div>
		</div>
	</div>
</form>